import 'dart:convert';
import 'dart:core';

class Hospital {
  String hospitalId, hospitalName, province, city;

  Hospital(this.hospitalId, this.hospitalName, this.province, this.city);

  factory Hospital.fromJson(Map<String, dynamic> data) {
    return Hospital(
      data['hospitalId'],
      data['hospitalName'],
      data['province'],
      data['city'],
    );
  }

  Map<String, dynamic> toMap() {
    return {
      'hospitalId': hospitalId,
      'hospitalName': hospitalName,
      'province': province,
      'city': city,
    };
  }

  @override
  String toString() {
    return json.encode(toMap());
  }
}
